package Work319.Test1;

/**
 * @author 张恒冕
 * 2019/3/19 9:51
 */
public class University {
   private Double math;
   private Double english;
   private Double chinese;
   private Double sport;

    public University() {
    }

    public University(Double math, Double english, Double chinese, Double sport) {
        this.math = math;
        this.english = english;
        this.chinese = chinese;
        this.sport = sport;
    }

    public void setMath(Double math) {
        this.math = math;
    }

    public void setEnglish(Double english) {
        this.english = english;
    }

    public void setChinese(Double chinese) {
        this.chinese = chinese;
    }

    public void setSport(Double sport) {
        this.sport = sport;
    }

    public Double getMath() {
        return math;
    }

    public Double getEnglish() {
        return english;
    }

    public Double getChinese() {
        return chinese;
    }

    public Double getSport() {
        return sport;
    }

    void  enter(){
       if ((getEnglish()+getChinese()+getMath())>=180 && getSport()>=60){
           System.out.println("恭喜，3门总分为："+(getEnglish()+getChinese()+getMath())+"且体育达标，达到大学录取线");
       }else {
           System.out.println("您落榜了");
       }
    }
}
